﻿using AutoWelding.DAL;
using AutoWelding.Models;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace AutoWelding.BLL
{
    public class LogsBLL
    {
        /// <summary>
        /// 获取所有日志数据，返回List
        /// </summary>
        /// <returns></returns>
        public List<LogsModel> GetLogsList(string logLevel, DateTime startTime, DateTime endTime)
        {
            try
            {
                LogsDAL logsDAL = new LogsDAL();
                // 这里可以添加业务逻辑，如缓存检查等
                return logsDAL.GetLogsList(logLevel, startTime, endTime);
            }
            catch (Exception ex)
            {
                // 业务逻辑层 记录日志 重新抛出异常
                // throw new Exception("业务处理失败: " + ex.Message);
                throw;
            }
        }
    }
}
